* calendar.el (calendar-time-zone): Initialize this when
authorJim Blandy <jimb@redhat.com>
Tue, 16 Mar 1993 09:13:53 +0000 (09:13 +0000)
committerJim Blandy <jimb@redhat.com>
Tue, 16 Mar 1993 09:13:53 +0000 (09:13 +0000)
calendar.el loads, not in the defvar.

lisp/calendar/calendar.el

index 91a0bfd8224ade66bc03d4991c31fc351b1b7976..11900f5f7c446aaf91e3c78db3804dcd093b5dd9 100644 (file)
@@ -477,11 +477,22 @@ For example, -74.0 for New York City.")
 `calendar-longitude', calendar-latitude'.  Default value is just the latitude,
 longitude pair.")
 
+;;; Since this defvar is marked to go into loaddefs.el, it will be
+;;; evaluated when Emacs is dumped.  However, this variable's
+;;; appropriate value really depends on the conditions under which the
+;;; code is invoked; it would be inappropriate to initialize this when
+;;; Emacs is dumped.  So, we initialize it to nil now, and if it's
+;;; still nil when this file is actually loaded, we give it its real value.
 ;;;###autoload
-(defvar calendar-time-zone (car (current-time-zone))
+(defvar calendar-time-zone nil
   "*Number of minutes difference between local standard time at
 `calendar-location-name' and Universal (Greenwich) Time.  For example, -300
-for New York City, -480 for Los Angeles.")
+for New York City, -480 for Los Angeles.
+If this is nil, it will be set to the local time zone when the calendar
+package loads.")
+;;; If the user has given this a real value, don't wipe it out.
+(or calendar-time-zone
+    (setq calendar-time-zone (current-time-zone)))
 
 ;;;###autoload
 (defvar calendar-standard-time-zone-name (car (nthcdr 2 (current-time-zone)))